{% extends 'generic/object.html' %}
{% load helpers %}
{% load static %}

{% block breadcrumbs %}
  <li><a href="{% url 'extras:journalentry_list' %}">Journal Entries</a></li>
  <li><a href="{% url object.assigned_object|viewname:'journal' pk=object.assigned_object.pk %}">{{ object.assigned_object }}</a></li>
  <li>{{ object }}</li>
{% endblock %}

{% block content %}
    <div class="row">
        <div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <strong>Journal Entry</strong>
                </div>
                <table class="table table-hover panel-body attr-table">
                    <tr>
                        <td>Object</td>
                        <td>
                            <a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}</a>
                        </td>
                    </tr>
                    <tr>
                        <td>Created</td>
                        <td>
                            {{ object.created|annotated_date }}
                        </td>
                    </tr>
                    <tr>
                        <td>Created By</td>
                        <td>
                            {{ object.created_by }}
                        </td>
                    </tr>
                    <tr>
                        <td>Kind</td>
                        <td>
                          <span class="label label-{{ object.get_kind_class }}">{{ object.get_kind_display }}</span>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="col-md-8">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <strong>Comments</strong>
                </div>
                <div class="panel-body">
                    {{ object.comments|render_markdown }}
                </div>
            </div>
        </div>
    </div>
{% endblock %}
